﻿<%@ codepage=65001%><% 'UTF-8%>

<%'检查是否登录%>
<!--#include file="../Include/checklogin.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="../Include/Start.asp"-->

<!--#include file="../Include/Common.Security.asp"-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="description" content="消费记录保存网作为消费记录存储分析服务提供商，为企业和个人提供稳定的完全免费的消费记录信息处理服务。" />
	<meta name="keywords" content="消费记录保存网,消费记录,www.im315.com,im315.com,im315"/>
	 <!--meta信息-->
		<!--#include file="../Include/meta.asp"-->
		<!--end meta-->
	<title>消费记录保存网</title>
	
	<link rel="stylesheet" type="text/css"  href="../css/css-1.05.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/console-1.03.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/calendar.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/console_home-1.06.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/datepicker.css"/>
	
	<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="../js/jquery.extend-1.06.js"></script>
	<script type="text/javascript" src="../js/common_1.01.js"></script>
	<script type="text/javascript" src="../js/consumption_my_manage.js"></script>
	<script type="text/javascript" src="../js/menu.js"></script>
	<script type="text/javascript" src="../js/TrimPathTemplate.js"></script>
	<script type="text/javascript" src="../js/calendar/WdatePicker.js" ></script>
</head>

<body>
<div class="wrapper">

	<!--header页头信息-->
	<!--#include file="../Include/header.asp"-->
	<!--end header页头信息-->


	<!--navigation菜单信息-->
	<!--#include file="../Include/navigation.asp"-->
	<script type="text/javascript">
		/*选中该tab页 需要tab页上有ID*/
		$("#consumption").attr("className","on")
$("#navigation").menu('point');</script>
	<!--end navigation菜单信息-->

<!--begin container-->
<%
dim cid
  cid=request("cid")
%>
<div class="container" id="container">
 
	
	<div class="c_left">
		<h2>消费记录</h2>
		<ul>
			<li class="on"><h3><a href="/console/consumption_my_manage.asp">我的消费记录</a></h3></li>
			<li><h3><a href="/console/consumption_my_return.asp">我的退货记录</a></h3></li>
		</ul>
	</div>
	<div class="c_right">
		<div class="c_r_head">
			<ul class="head_tab">
				<li class="on"><h4><a href="consumption_my_manage.asp##div_tab_card_list">消费记录</a></h4></li>
				<li><h4><a href="consumption_my_manage.asp##div_tab_card_add">添加消费记录</a></h4></li>
			</ul>
		</div>
		<div class="c_r_body" id="div_tab_card_list">
			<form id="scform" action="consumption_my_manage_do.asp" method="post" >
				<input id="page" name="page" type="hidden" value="1" />
				<div align="center" style="height:25px">
					查询消费记录信息
				</div>
				<table width="100%" border="0" cellpadding="0" cellspacing="2" style="margin:auto"> 
					<tr>
						<td align="right">id：</td><td>
							<input type="text" name="cid" id="cid" class="text" value="<%=cid%>" style="width:90px" maxlength="20" />
						</td>
						<td align="right">卡号：</td><td>
							<input type="text" name="cardcode" id="cardcode" class="text" value="<%=cardcode%>" style="width:90px" maxlength="20" />
						</td>
						<td align="right">条码号：</td><td>
							<input type="text" name="Spcode" id="Spcode" class="text" value="" style="width:90px" maxlength="50" />
						</td>
						<td align="right">商品名称：</td><td>
							<input type="text" name="spname" id="spname" class="text" value="" style="width:90px" maxlength="50" />
						</td>
					</tr>
					<tr>
						<td height="30">&nbsp;</td>
						<td><input type="submit" value="提交" /></td>
					</tr>
				</table>
			</form>
			<!--查询结果显示 begin-->
			<div id="div_rslist"></div>
			<!--查询结果显示 end-->
		 	<!--Trimpath Templates begin-->
			<!--缓存json数据 并将其转换成对象obj_json_data-->
		  <div id="div_load_json_temp" style='display:none;' ></div>				
				<div  style='display:none;'  >
				<textarea name="template_jst" id="template_jst"   >
					<!--显示记录列表 begin-->
					<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list">
						<colgroup>
							<col width="30"/>
							{var colume_list =['卡号','商品条形码','商品名称','生产厂商','规格','商标','生产批次','']}
							{var colume_list_1 =['','生产日期','到期时间','数量','单价','商店代码','购买日期','经办人','操作']}
							{for colume_name in colume_list}
											<col/>
							{/for}
						</colgroup>
						<thead>
							<tr>
								<th align="center"><input type="checkbox" onclick="checkboxAll('id_all',this)" name="checkboxAll"/></th>
								{for colume_name in colume_list}
											<th>@{colume_name}</th>
								{/for}
							</tr>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
							<tr>
								{for colume_name in colume_list_1}
											<th>@{colume_name}</th>
								{/for}
							</tr>
						</thead>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
						<tbody>
					{var flag_Num =1}
					{var tr_class ='bgblue'}
					{for p in rslist}
					     <tr class="@{tr_class}" onmouseover="$(this).addClass('on')" onmouseout="$(this).removeClass('on')">
					     	<td align="center"><input type="checkbox" value="@{p.id}" name="id_all" id="id_all"/></td>
					     	<td>@{p.Cardcode}</td>
					     	<td>@{p.Spcode}</td>
					     	<td>@{p.spname}</td>
					     	<td>@{p.sccs}</td>
					     	<td>@{p.gg}</td>
					     	<td>@{p.shangbiao}</td>
					     	<td>@{p.scpc}</td>
					     		<td></td>
					     </tr>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
					     <tr class="@{tr_class}" onmouseover="$(this).addClass('on')" onmouseout="$(this).removeClass('on')">
					     	<td></td>
					     	<td>@{p.scrq}</td>
					     	<td>@{p.dqsj}</td>
					     	<td>@{p.sl}</td>
					     	<td>@{p.dj}</td>
					     	<td>@{p.qycode}</td>
					     	<td>@{p.gmrq}</td>
					     	<td>@{p.jbr}</td>
					     	<td>
					     		{if '1'==p.flag }<a onclick="rs_el_Return('@{p.id}')" href="javascript:void(0);">退货</a>{/if}	
					     		{if '2'==p.flag }<a onclick="rs_el_Delete('@{p.id}')" href="javascript:void(0);">删除</a>{/if}	
					     	</td>
					     </tr>
					{if tr_class=='bgblue' }{var tr_class =''}{else}{var tr_class ='bgblue'}{/if}				
					{forelse}
					     <tr><td colspan="@{1+colume_list.length}">没有查询结果...</tr>
					{/for}
						</tbody>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
					</table>
					<!--显示记录列表end-->
					<!--分页begin-->			
					{if page.PageSizeCur>0 }
					<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tbody>
							<tr>
								<td height="30">
									<div class="pages">
										{if page.PageCur>1}				
										<a title="第一页" class="first" onclick='loadRsList("1")' href="javascript:void(0);">1 ..</a>
										<a title="上一页" class="prev"  onclick='loadRsList("@{page.PageCur-1}")' href="javascript:void(0);">‹上一页</a>{/if}
										<strong>[@{page.PageCur}]</strong>
										{if page.PageCur<page.PageTotalNum}
										<a title="下一页" class="next"  onclick='loadRsList("@{page.PageCur-(-1)}")' href="javascript:void(0);">下一页›</a>
										<a title="最后一页" class="last" onclick='loadRsList("@{page.PageTotalNum}")' href="javascript:void(0);">@{page.PageTotalNum} ..</a>{/if}
										<em>共 @{page.PageTotalNum} 页</em>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
					{/if}		
					<!--分页end-->
				
		</textarea>
	</div>
				
	<!--Trimpath Templates End-->			
			
			
			
		</div>
		<div class="c_r_body" id="div_tab_card_add">
			<form action="consumption_my_manage_do.asp" method="post" id="form_card_add">
						<%
						dim strSql,Cardcode,UserID
						UserID=ReplaceBadChar(Trim(Session("UserID")))
						strSql = "SELECT  cardcode from HY_KH WHERE Hycode = '"&UserID&"' AND flag = '2' AND zt = 1"
						''set rsObj=Server.CreateObject("ADODB.Recordset")
						set rsObj= Conn.Execute(strSql)
						If rsObj.BOF And rsObj.EOF Then
							Cardcode=""
						else
							Cardcode = CStr(Conn.Execute(strSql)(0))
						end if
						%>
				<input id="Cardcode" name="Cardcode" type="hidden" value="<%=Cardcode%>" />
			<div align="center" style="height:25px">
			添加消费记录
			</div>
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
					<tr>
						<td align="right">卡号:</td>
						<td><%=Cardcode%></td>
						<td align="right">商品条形码:</td>
						<td><input name="Spcode" id="Spcode" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">商品名称:</td>
						<td><input name="spname" id="spname" type="text" maxlength="50" class="text" style="width:100px"/></td>
						<td align="right">生产厂商：</td>
						<td><input name="sccs" id="sccs" type="text" maxlength="50" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">规格:</td>
						<td><input name="gg" id="gg" type="text" maxlength="50" class="text" style="width:100px"/></td>
						<td align="right">商标:</td>
						<td><input name="shangbiao" id="shangbiao" type="text" maxlength="50" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">生产批次:</td>
						<td><input name="scpc" id="scpc" type="text" maxlength="50" class="text" style="width:100px"/></td>
						<td align="right">生产日期:</td>
						<td><input type="text" maxlength="10" value="2009-06-01" onfocus="WdatePicker({el:this})" style="width: 90px;"  class="text Wdate" name="scrq" realvalue="2009-06-15"/></td>
					</tr>
					<tr>
						<td align="right">到期时间:</td>
						<td><input type="text" maxlength="10"  value="<%=date()%>" onfocus="WdatePicker({el:this})" style="width: 90px;"  class="text Wdate" id="dqsj" name="dqsj" realvalue="<%=date()%>"/>
						<td align="right">数量:</td>
						<td><input name="sl" id="sl" type="text" maxlength="14" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">单价:</td>
						<td><input name="dj" id="dj" type="text" maxlength="14" class="text" style="width:100px"/></td>
						<td align="right">商店代码:</td>
						<td><input name="qycode" id="qycode" type="text" maxlength="50" class="text" style="width:100px"/></td>
					</tr>					
					<tr>
						<td align="right">购买日期:</td>
						<td><input type="text" maxlength="10"  value="<%=date()%>" onfocus="WdatePicker({el:this})" style="width: 90px;"  class="text Wdate" id="gmrq" name="gmrq" realvalue="<%=date()%>"/>
						<td align="right"></td>
					</tr>

					
					
					<tr>
						<td align="right"> </td>
						<td><input name="" type="submit" value="添加" />&nbsp;<label id="result"></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>

	<script type="text/javascript">		
		initPage();	
		$('#scform').submit();
</script>
	
 
 
</div>



	
	
</div>
<!--footer页脚信息-->
<!--#include file="../Include/footer.asp"-->
<!--end footer页脚信息-->
</div>
</body>
</html>
